﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections.Generic;
using Runda.CMS.Common.Utility;
using Runda.CMS.Common.Entity;
using Runda.CMS.Bll;

namespace Runda.CMS.Portal.WorkFlow
{
    public partial class WF_Graph : Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                this.ProcessGUID.Text = this.Request.QueryString["ModelID"];                 
            }
       
            if (this.ProcessGUID.Text.Length > 0)
            {
                string processEntityXML;

                processEntityXML = new WorkflowBll().GetProcessEntityXML(this.ProcessGUID.Text);

                this.GraphContext.Text = Xslt.transformHTML(processEntityXML, this.Server.MapPath(".") + @"\WF_Graph.xslt");
            }
            else
            {
                this.GraphContext.Text = "对不起，流程数据读取失败!";
            }
        }       
    }
}
